<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <script>
        let array = [0,1,2,3,4,5,6,7,8,9];
        let newArr = [];
        console.log(array);
        // for(let i = 0; i < array.length; i++){
        //     if(array[i] % 2 != 0){
        //         newArr.push(array[i]);
        //     }
        // }
        // console.log(newArr);

        array.splice(2,3,'hello','world','js');
        console.log(array);
        array.splice(2,3);
        console.log(array);
    </script>
</head>
<body>
    
</body>
</html>